package com.iocup.keybastion.common;


import lombok.Getter;
import lombok.Setter;

/**
 * @author Misagh Moayyed
 * @since 1.8.1
 */
@Setter
@Getter
public final class Cookie {

    private String name;
    private String value;
    private String domain;
    private int maxAge = -1;
    private String path;
    private boolean secure;
    private boolean isHttpOnly = false;
    private String sameSitePolicy;

    public Cookie(final String name, final String value) {
        if (name == null || name.length() == 0) {
            throw new RuntimeException("cookie name and value cannot be empty");
        }
        this.name = name;
        this.value = value;
    }

}
